﻿<?xml version="1.0" encoding="utf-8"?>
<!-- 

Copyright 2008 PivDev

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. 
-->
<Preferences xmlns="http://tempuri.org/config.xsd">
  <!--Definition of the field config, used in drag / drop of fields and building Classes-->
  <Field>
    <!--Prefix - Defines the bit before a field definition, include a space at the end if you need to-->
    <Prefix>public const string </Prefix>
    <!--Region - Defines a region to place all the fields in-->
    <Region>Fields</Region>
    <!--Capitalise (Boolean)- Will capitalise the fieldname-->
    <Capitalise>true</Capitalise>
    <!--Suffix - Defines any thing you want to add after a field definition-->
    <Suffix />
    <PrefixRemove>
      <!--Add each prefix that you want removing from the fieldname-->
      <Prefix>CRM_</Prefix>
    </PrefixRemove>
    <SubClass>
      <!--Defines a subclass to wrap the fields in, comes outside any defined region-->
      <Name>Fields</Name>
      <Prefix>internal class </Prefix>
    </SubClass>
  </Field>
  <!--Definition of the query config, used in drag / drop of queries and building Classes-->
  <Query>
    <!--Prefix - Defines the bit before a query definition, include a space at the end if you need to-->
    <Prefix>public const string </Prefix>
    <!--Region - Defines a region to place all the queries in-->
    <Region />
    <!--Capitalise (Boolean)- Will capitalise the Queryname-->
    <Capitalise>true</Capitalise>
    <!--Defines a subclass to wrap the queries in, comes outside any defined region-->
    <SubClass>
      <Name>Queries</Name>
    </SubClass>
    <!--ReplaceChars - Defines a list of Characters to replace in querynames-->
    <ReplaceChars>
      <!--Single Character to replace, can be multiple. 'space' is used to denote space, as could not get space character work on its own-->
      <Char>:</Char>
      <Char>space</Char>
      <Char>?</Char>
      <Char>/</Char>
      <Char>\</Char>
      <Char>:</Char>
      <Char>-</Char>
      <Char>(</Char>
      <Char>)</Char>
      <Char>'</Char>
      <!--ReplaceWith - Defines -->
      <ReplaceWith>_</ReplaceWith>
      <!--RemoveWithCharsEnd (Bool)- Removes any replaced characters at end of query name -->
      <RemoveWithCharsEnd>true</RemoveWithCharsEnd>
      <!--RemoveWithCharsStart (Bool)- Removes any replaced characters at start of query name -->
      <RemoveWithCharsStart>false</RemoveWithCharsStart>
    </ReplaceChars>
  </Query>
  <!--Definition of table config, used in drag / drop of tables & building classes-->
  <Table>
    <!--Prefix - Defines the bit before a table definition, include a space at the end if you need to-->
    <Prefix>public const string </Prefix>
    <!--Region - Defines a region to place Table (and subsequent queries and fields) in-->
    <Region>Table / Fields</Region>
    <!--Capitalise (Boolean)- Will capitalise the table name-->
    <Capitalise>false</Capitalise>
    <!--Suffix - Defines any thing you want to add after a table definition-->
    <Suffix />
    <!--Add each prefix that you want removing from the tablename-->
    <PrefixRemove>
      <Prefix>CRM_</Prefix>
    </PrefixRemove>
    <!--Name - denotes the substitution for the table definition, so that all classes have same constant-->
    <!--Any value here will mean the other stuff is ignored-->
    <Name>table_name</Name>
  </Table>
  <!--Defintion used when creating a data class (constants class)-->
  <DataBuild>
    <!--ClassInherits - List of inherits to insert after class definition, such as a base table dataclass-->
    <ClassInherits>
      <Inherits />
    </ClassInherits>
    <!--Any Additional namespaces you want to add-->
    <Namespaces>
      <Namespace>Constants</Namespace>
    </Namespaces>
    <!--List of usings to add to beginning of new file-->
    <Usings>
      <Using>System</Using>
      <Using>System.Collections.Generic</Using>
      <Using>System.Collections</Using>
      <Using>System.Text</Using>
      <Using>System.Web</Using>
      <Using>System.IO</Using>
      <Using>System.Runtime.InteropServices</Using>
      <Using>System.Reflection</Using>
      <Using>Pivotal.Interop.ADODBLib</Using>
      <Using>Pivotal.Interop.RDALib</Using>
      <Using>Pivotal.Application.Foundation.Utility</Using>
      <Using>Pivotal.Application.Foundation.BusinessRule</Using>
      <Using>Pivotal.Application.Foundation.Data.Element</Using>
      <Using>Pivotal.Application.Foundation.Data.Element.Choice</Using>
      <Using>Pivotal.Application.Foundation.Data.Element.Form</Using>
      <Using>Pivotal.Application.Foundation.Data.Element.LDGroup</Using>
      <Using>Pivotal.Application.Foundation.Data.Element.Query</Using>
      <Using>Pivotal.Application.Foundation.Data.Element.Table</Using>
      <Using>Pivotal.Interop</Using>
    </Usings>
    <!--List of extra methods you want to add, stuff that you always do, such as getrecordset-->
    <!--Attribute of Region defines the region to include methods in. You can have more than one Methods obejct-->
    <Methods region="Constuctor">
      <!--Method - defines a method to include, constructor attribute denotes it is a constructor class-->
      <Method constructor="true">
        <!--code - defintion of code to include, $methodname$ will be replaced with generated name-->
        <code>
public $methodname$()
{
}
        </code>
      </Method>
      <Method constructor="true">
        <code>
public $methodname$(IRSystem7 rdaSystem)
{
  m_rdaSystem = rdaSystem;
  m_dataAccess = (DataAccess)m_rdaSystem.
  ServerScripts[AppServerRuleData.DataAccessAppServerRuleName].CreateInstance();
}
        </code>
      </Method>
    </Methods>
    <!--Another methods definition-->
    <Methods region="Other Stuff">
      <Method>
        <code>
public string Testing()
{
  return "Test";
}
        </code>
      </Method>
    </Methods>
    <!--List of variables to define at top of class-->
    <Variables>
      <Variable>private IRSystem7 m_rdaSystem</Variable>
      <Variable>private object m_RecordId</Variable>
      <Variable>private DataAccess m_dataAccess</Variable>
      <Variable>private Recordset m_rstObject</Variable>
    </Variables>
    <!--Prefix to class-->
    <Prefix>public class </Prefix>
  </DataBuild>
  <!--Defintion used when creating a Formscript class -->
  <FormScriptBuild>
    <!--ClassInherits - List of inherits to insert after class definition, such as IRFormScript-->
    <ClassInherits>
      <Inherits>IRFormScript</Inherits>
    </ClassInherits>
    <!--Any Additional namespaces you want to add-->
    <Namespaces>
      <Namespace />
    </Namespaces>
    <!--List of usings to add to beginning of new file-->
    <Usings>
      <Using>System</Using>
      <Using>System.Collections.Generic</Using>
      <Using>System.Collections</Using>
      <Using>System.Text</Using>
      <Using>System.Web</Using>
      <Using>System.IO</Using>
      <Using>System.Runtime.InteropServices</Using>
      <Using>System.Reflection</Using>
      <Using>Pivotal.Interop.ADODBLib</Using>
      <Using>Pivotal.Interop.RDALib</Using>
      <Using>Pivotal.Application.Foundation.Utility</Using>
      <Using>Pivotal.Application.Foundation.BusinessRule</Using>
      <Using>Pivotal.Application.Foundation.Data.Element</Using>
      <Using>Pivotal.Application.Foundation.Data.Element.Choice</Using>
      <Using>Pivotal.Application.Foundation.Data.Element.Form</Using>
      <Using>Pivotal.Application.Foundation.Data.Element.LDGroup</Using>
      <Using>Pivotal.Application.Foundation.Data.Element.Query</Using>
      <Using>Pivotal.Application.Foundation.Data.Element.Table</Using>
      <Using>Pivotal.Interop</Using>
    </Usings>
    <!--List of variables to define at top of class-->
    <Variables>
      <Variable>private IRSystem7 m_rdaSystem;</Variable>
      <Variable>private Logging oLogger;</Variable>
    </Variables>
    <!--Prefix to class-->
    <Prefix>public class </Prefix>
    <!--List of implemented methods - each standard method has it's own definition
    where you can use the default, or override with something of your own-->
    <ImpMethods>
      <!--UseTryCatch - surronds generated code with try / catch block-->
      <Execute UseTryCatch="true">
        <!--Prefix - denoted prefix to generated method-->
        <Prefix />
        <!--UseDefault - uses the OOB definition of the method-->
        <UseDefault>true</UseDefault>
      </Execute>
      <LoadForm UseTryCatch="true">
        <!--Code - used instead of the default, usetrycatch is ignored
        Align code with left side of file, as generator will add the appropriate indentation-->
        <Code>
public virtual object LoadFormData(IRForm pForm, object recordId, ref object parameterList)
{
  {
    
    object recordsetList = pForm.DoLoadFormData(recordId, ref parameterList);
    

    return recordsetList;
  }
  catch (Exception e)
  {
    throw new PivotalApplicationException(e.Message, e, m_rdaSystem);
  }
}
        </Code>
      </LoadForm>
      <NewForm>
        <UseDefault>true</UseDefault>
      </NewForm>
      <SaveForm UseTryCatch="true">
        <Prefix>public virtual </Prefix>
        <UseDefault>true</UseDefault>
      </SaveForm>
    </ImpMethods>
  </FormScriptBuild>
  <Form>
    <Capitalise>true</Capitalise>
    <PrefixRemove>
      <Prefix>CRM_</Prefix>
    </PrefixRemove>
    <ReplaceChars>
      <!--Single Character to replace, can be multiple. 'space' is used to denote space, as could not get space character work on its own-->
      <Char>:</Char>
      <Char>space</Char>
      <Char>?</Char>
      <Char>/</Char>
      <Char>\</Char>
      <Char>:</Char>
      <Char>-</Char>
      <Char>(</Char>
      <Char>)</Char>
      <Char>'</Char>
      <!--ReplaceWith - Defines -->
      <ReplaceWith>_</ReplaceWith>
      <!--RemoveWithCharsEnd (Bool)- Removes any replaced characters at end of query name -->
      <RemoveWithCharsEnd>true</RemoveWithCharsEnd>
      <!--RemoveWithCharsStart (Bool)- Removes any replaced characters at start of query name -->
      <RemoveWithCharsStart>false</RemoveWithCharsStart>
    </ReplaceChars>
  </Form>
  <Tab>
    <Region>Tabs</Region>
    <Capitalise>true</Capitalise>
    <PrefixRemove>
      <Prefix>CRM_</Prefix>
    </PrefixRemove>
    <ReplaceChars>
      <!--Single Character to replace, can be multiple. 'space' is used to denote space, as could not get space character work on its own-->
      <Char>:</Char>
      <Char>space</Char>
      <Char>?</Char>
      <Char>/</Char>
      <Char>\</Char>
      <Char>:</Char>
      <Char>-</Char>
      <Char>(</Char>
      <Char>)</Char>
      <Char>'</Char>
      <!--ReplaceWith - Defines -->
      <ReplaceWith>_</ReplaceWith>
      <!--RemoveWithCharsEnd (Bool)- Removes any replaced characters at end of query name -->
      <RemoveWithCharsEnd>true</RemoveWithCharsEnd>
      <!--RemoveWithCharsStart (Bool)- Removes any replaced characters at start of query name -->
      <RemoveWithCharsStart>false</RemoveWithCharsStart>
    </ReplaceChars>
  </Tab>
  <Segment>
    <Region>Segments</Region>
    <Capitalise>true</Capitalise>
    <ReplaceChars>
      <!--Single Character to replace, can be multiple. 'space' is used to denote space, as could not get space character work on its own-->
      <Char>:</Char>
      <Char>space</Char>
      <Char>?</Char>
      <Char>/</Char>
      <Char>\</Char>
      <Char>:</Char>
      <Char>-</Char>
      <Char>(</Char>
      <Char>)</Char>
      <Char>'</Char>
      <!--ReplaceWith - Defines -->
      <ReplaceWith>_</ReplaceWith>
      <!--RemoveWithCharsEnd (Bool)- Removes any replaced characters at end of query name -->
      <RemoveWithCharsEnd>true</RemoveWithCharsEnd>
      <!--RemoveWithCharsStart (Bool)- Removes any replaced characters at start of query name -->
      <RemoveWithCharsStart>false</RemoveWithCharsStart>
    </ReplaceChars>
  </Segment>
  <DiscFormField>
    <Prefix>public const string dis</Prefix>
    <Region>Disconnected Fields</Region>
    <Capitalise>true</Capitalise>
    <PrefixRemove>
      <Prefix>CRM_</Prefix>
    </PrefixRemove>
    <Unique>true</Unique>
    <ReplaceChars>
      <!--Single Character to replace, can be multiple. 'space' is used to denote space, as could not get space character work on its own-->
      <Char>:</Char>
      <Char>space</Char>
      <Char>?</Char>
      <Char>/</Char>
      <Char>\</Char>
      <Char>:</Char>
      <Char>-</Char>
      <Char>(</Char>
      <Char>)</Char>
      <Char>'</Char>
      <!--ReplaceWith - Defines -->
      <ReplaceWith>_</ReplaceWith>
      <!--RemoveWithCharsEnd (Bool)- Removes any replaced characters at end of query name -->
      <RemoveWithCharsEnd>true</RemoveWithCharsEnd>
      <!--RemoveWithCharsStart (Bool)- Removes any replaced characters at start of query name -->
      <RemoveWithCharsStart>false</RemoveWithCharsStart>
    </ReplaceChars>
  </DiscFormField>
</Preferences>